.clearfix() {
    zoom: 1;
    &:before,
    &:after {
        content: "";
        display: table;
    }
    &:after {
        clear: both;
        visibility: hidden;
        font-size: 0;
        height: 0;
    }
}

// form
.placeholder(@color: @input-placeholder-color) {
    // Firefox
    &::-moz-placeholder {
        color: @color;
        opacity: 1;
    }
    // Internet Explorer 10+
    &:-ms-input-placeholder {
        color: @color;
    }
    // Safari and Chrome
    &::-webkit-input-placeholder {
        color: @color;
    }
}

.active(@color: @input-hover-border-color) {
    border-color: tint(@color, 10%);
    outline: 0;
}

.disabled() {
    background-color: @input-disabled-bg;
    opacity: 1;
    cursor: @cursor-disabled;
    color: #ccc;
}
.input() {
    display: inline-block;
    width: 100%;
    height: @input-height-base;
    line-height: @line-height-base;
    padding: @input-padding-vertical-base @input-padding-horizontal;
    font-size: @font-size-sm;
    border: 1px solid @input-border-color;
    border-radius: 4px;
    color: @input-color;
    background-color: @input-background;
    background-image: none;
    position: relative;
    cursor: text;
    .placeholder();
    transition: border @transition-time @ease-in-out, background @transition-time @ease-in-out, box-shadow @transition-time @ease-in-out;
    &:focus {
        .active();
    }
    &[disabled],
    fieldset[disabled] & {
        .disabled();
    }
}